package com.jackrain.nea.ext.permission;

import com.google.common.base.Objects;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author yangxy
 * @Date Create in 16:08 2017-12-16
 * @Description:
 * @Modified by:
 */
@Data
public class ColumnPermission implements Serializable {
    private static final long serialVersionUID = -2836411923933109584L;

    /**
     * 敏感列id
     */
    private Long columnId;
    private String ecode;

    private String isRead;
    private String isModify;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ColumnPermission c = (ColumnPermission) o;
        return Objects.equal(ecode, c.ecode);
    }


    @Override
    public int hashCode() {
        return Objects.hashCode(ecode);
    }
}
